#include "OCMain/Environment.h"
#include "OCMain/ArgumentParser.h"
#include "OCOpenGL/Engine.h"

using namespace OCPP;

Environment* mEnvironment = NULL;

BOOL WINAPI HandlerRoutine(DWORD dwCtrlType) 
{

    if (CTRL_CLOSE_EVENT == dwCtrlType) {
        CORE_SAFE_DELETE(mEnvironment);
    }

    return TRUE;
}

int main(int argc, char** argv)
{
    ArgumentParser arguments(&argc, argv);
    
    String baseName, appPath;
    StringUtil::splitFilename(arguments[0], baseName, appPath);
    mEnvironment = new Environment(appPath);

    Engine engine;
    engine.start();

	return 0;
}
